<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    tbody tr:nth-child(2n) {
      /* 第2n个元素,伪类选择器 */
      /* 伪类选择器：元素的某一个状态 */
      /* 伪元素选择器：一个虚拟的元素 */
      background-color: red;
    }
  </style>
</head>
<body>
  <table border="1" cellspacing="0">
    <thead>
      <tr>
        <th colspan="3">学生信息登记表</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>姓名</td>
        <td>性别</td>
        <td>学号</td>
      </tr>
      <tr>
        <td>刘备</td>
        <td>男</td>
        <td>001</td>
      </tr>
      <tr>
        <td>关羽</td>
        <td>男</td>
        <td>002</td>
      </tr>
      <tr>
        <td>张飞</td>
        <td>男</td>
        <td>003</td>
      </tr>
      <tr>
        <td>赵云</td>
        <td>男</td>
        <td>004</td>
      </tr>
      <tr>
        <td>马超</td>
        <td>男</td>
        <td>005</td>
      </tr>
      <tr>
        <td>黄忠</td>
        <td>男</td>
        <td>006</td>
      </tr>
    </tbody>
  </table>
</body>
</html>